const mysql = require("mysql");

let pool = mysql.createPool({
    host:"localhost",
    port:3306,
    user:"root",
    password:"root",
    database:"db-system"
})
/**查询 */
let selectSql = "select * from users";
/**修改 */
let updateSql ="update users set userName=? where age=?";
let deleteSql ="delete from users where userId=?";
pool.query(selectSql,(err,result) => {
    if (err){
        console.log(err);
    }
    else{
        console.log(result);
    }
})